/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * SettingDialog.java
 *
 * Created on Feb 22, 2011, 10:41:51 PM
 */

package org.game.math.view;

//import org.game.math.config.Configure;

/**
 *
 * @author nmduc
 */
class SettingDialog(parent:java.awt.Frame, modal:Boolean) extends javax.swing.JDialog(parent, modal) {
  // Variables declaration - do not modify
  private var buttonGroup1:javax.swing.ButtonGroup=null;
  private var jButton1:javax.swing.JButton=null;
  private var jButton2:javax.swing.JButton=null;
  private var jCheckBox1:javax.swing.JCheckBox=null;
  private var jComboBox1:javax.swing.JComboBox=null;
  private var jComboBox2:javax.swing.JComboBox=null;
  private var jComboBox3:javax.swing.JComboBox=null;
  private var jLabel1:javax.swing.JLabel=null;
  private var jLabel2:javax.swing.JLabel=null;
  private var jLabel3:javax.swing.JLabel=null;
  private var jLabel4:javax.swing.JLabel=null;
  private var jLabel5:javax.swing.JLabel=null;
  private var jPanel1:javax.swing.JPanel=null;
  private var jPanel2:javax.swing.JPanel=null;
  private var jPanel4:javax.swing.JPanel=null;
  private var jPanel5:javax.swing.JPanel=null;
  private var jPanel6:javax.swing.JPanel=null;
  // End of variables declaration

  initComponents();

  /** This method is called from within the constructor to
   * initialize the form.
   * WARNING: Do NOT modify this code. The content of this method is
   * always regenerated by the Form Editor.
   */
  // <editor-fold defaultstate="collapsed" desc="Generated Code">
  private def initComponents():Unit = {
    var gridBagConstraints:java.awt.GridBagConstraints = null;

    buttonGroup1 = new javax.swing.ButtonGroup();
    jPanel5 = new javax.swing.JPanel();
    jButton1 = new javax.swing.JButton();
    jButton2 = new javax.swing.JButton();
    jPanel1 = new javax.swing.JPanel();
    jLabel1 = new javax.swing.JLabel();
    jPanel6 = new javax.swing.JPanel();
    jPanel4 = new javax.swing.JPanel();
    jPanel2 = new javax.swing.JPanel();
    jLabel2 = new javax.swing.JLabel();
    jLabel3 = new javax.swing.JLabel();
    jLabel4 = new javax.swing.JLabel();
    jLabel5 = new javax.swing.JLabel();
    jComboBox1 = new javax.swing.JComboBox();
    jComboBox2 = new javax.swing.JComboBox();
    jComboBox3 = new javax.swing.JComboBox();
    jCheckBox1 = new javax.swing.JCheckBox();

    setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
    setName("Form"); // NOI18N
    setResizable(false);

    jPanel5.setName("jPanel5"); // NOI18N
    jPanel5.setLayout(new java.awt.GridBagLayout());

    jButton1.setAction(new org.game.math.view.action.PreferenceOKAction());
    val resourceMap:org.jdesktop.application.ResourceMap = org.jdesktop.application.Application.getInstance(classOf[org.game.math.view.PrimaryMathApp]).getContext().getResourceMap(classOf[SettingDialog]);
    jButton1.setFont(resourceMap.getFont("jButton1.font")); // NOI18N
    jButton1.setText(resourceMap.getString("jButton1.text")); // NOI18N
    jButton1.setName("jButton1"); // NOI18N
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.insets = new java.awt.Insets(10, 100, 10, 5);
    jPanel5.add(jButton1, gridBagConstraints);

    jButton2.setAction(new org.game.math.view.action.PreferenceCancelAction());
    jButton2.setFont(resourceMap.getFont("jButton1.font")); // NOI18N
    jButton2.setText(resourceMap.getString("jButton2.text")); // NOI18N
    jButton2.setName("jButton2"); // NOI18N
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.insets = new java.awt.Insets(10, 5, 10, 100);
    jPanel5.add(jButton2, gridBagConstraints);

    getContentPane().add(jPanel5, java.awt.BorderLayout.SOUTH);

    jPanel1.setName("jPanel1"); // NOI18N

    jLabel1.setFont(resourceMap.getFont("jLabel1.font")); // NOI18N
    jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N
    jLabel1.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
    jLabel1.setName("jLabel1"); // NOI18N
    jPanel1.add(jLabel1);

    getContentPane().add(jPanel1, java.awt.BorderLayout.NORTH);

    jPanel6.setName("jPanel6"); // NOI18N
    jPanel6.setLayout(new java.awt.GridBagLayout());

    jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder()));
    jPanel4.setName("jPanel4"); // NOI18N

    jPanel2.setName("jPanel2"); // NOI18N
    jPanel2.setLayout(new java.awt.GridBagLayout());

    jLabel2.setFont(resourceMap.getFont("jLabel2.font")); // NOI18N
    jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
    jLabel2.setLabelFor(jCheckBox1);
    jLabel2.setText(resourceMap.getString("jLabel2.text")); // NOI18N
    jLabel2.setName("jLabel2"); // NOI18N
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.insets = new java.awt.Insets(10, 10, 10, 0);
    jPanel2.add(jLabel2, gridBagConstraints);

    jLabel3.setFont(resourceMap.getFont("jLabel5.font")); // NOI18N
    jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
    jLabel3.setLabelFor(jComboBox1);
    jLabel3.setText(resourceMap.getString("jLabel3.text")); // NOI18N
    jLabel3.setName("jLabel3"); // NOI18N
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.insets = new java.awt.Insets(10, 10, 10, 0);
    jPanel2.add(jLabel3, gridBagConstraints);

    jLabel4.setFont(resourceMap.getFont("jLabel5.font")); // NOI18N
    jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
    jLabel4.setLabelFor(jComboBox2);
    jLabel4.setText(resourceMap.getString("jLabel4.text")); // NOI18N
    jLabel4.setName("jLabel4"); // NOI18N
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.insets = new java.awt.Insets(10, 10, 10, 0);
    jPanel2.add(jLabel4, gridBagConstraints);

    jLabel5.setFont(resourceMap.getFont("jLabel5.font")); // NOI18N
    jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
    jLabel5.setLabelFor(jComboBox3);
    jLabel5.setText(resourceMap.getString("jLabel5.text")); // NOI18N
    jLabel5.setName("jLabel5"); // NOI18N
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 3;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.insets = new java.awt.Insets(10, 10, 10, 0);
    jPanel2.add(jLabel5, gridBagConstraints);

    jComboBox1.setModel(new org.game.math.view.domain.NumLengthComboBoxModel());
    jComboBox1.setName("jComboBox1"); // NOI18N
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 40;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.insets = new java.awt.Insets(10, 10, 10, 10);
    jPanel2.add(jComboBox1, gridBagConstraints);

    jComboBox2.setModel(new org.game.math.view.domain.NumExpressionComboBoxModel());
    jComboBox2.setName("jComboBox2"); // NOI18N
    jComboBox2.setVerifyInputWhenFocusTarget(false);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 40;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.insets = new java.awt.Insets(10, 10, 10, 10);
    jPanel2.add(jComboBox2, gridBagConstraints);

    jComboBox3.setModel(new org.game.math.view.domain.NumOperatorComboBoxModel());
    jComboBox3.setName("jComboBox3"); // NOI18N
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 3;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 40;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    gridBagConstraints.weightx = 0.5;
    gridBagConstraints.insets = new java.awt.Insets(10, 10, 10, 10);
    jPanel2.add(jComboBox3, gridBagConstraints);

    jCheckBox1.setModel(new org.game.math.view.domain.SignToggledModel());
    jCheckBox1.setText(resourceMap.getString("jCheckBox1.text")); // NOI18N
    jCheckBox1.setName("jCheckBox1"); // NOI18N
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    gridBagConstraints.insets = new java.awt.Insets(10, 10, 10, 10);
    jPanel2.add(jCheckBox1, gridBagConstraints);

    jPanel4.add(jPanel2);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(10, 20, 0, 20);
    jPanel6.add(jPanel4, gridBagConstraints);

    getContentPane().add(jPanel6, java.awt.BorderLayout.CENTER);

    pack();
  }// </editor-fold>


}
